Repository navigation
Logs: each call to the core logged with its duration and outcome - #1902
Open
vmillet-dev wants to merge 1 commit into
Open
vmillet-dev wants to merge 1 commit into
vmillet-dev wants to merge 1 commit into
Conversation
Each call, on the db, compute and spawn queues alike, is logged once at debug as it answers, under ui::backend: its queue, the action that queued it (Backend::as_action holds its number while AppState::act applies it; '-' outside one), the ui::api function that asked, how long the job ran, and ok or the error's code alone, never its detail. The frame-bound info line of debug builds goes, and no call becomes a warning for its duration: a large library would make the slowest calls warn every time, and a list of exceptions is one more thing to keep. Closes #1844 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BbVs5tCyTr9AasGra3Zzg3
This was referenced Dec 4, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1844
Each call answers in one line.
timednow wraps the three queues.dbandcomputetime the job itself;spawntimes its future. Each call is logged once atdebugunderui::backend, as it answers:Backend::as_actionholds the action's number whileAppState::actapplies it. A call queued in that time carries#412; a call queued outside an action carries-(an answer adopted, a frame's own read). The number is read on the UI thread when the call is queued.ui::api::and its closures trimmed off:notes::get. A call made outsideui::apikeeps its whole path (a file dialog inui::tools::…,ui::services::updates::…).ok, or the error's code alone ({:?}ofErrorCode, a fieldless enum), never its detail.Owner's decision applied. There is no slow-call
warn, on any queue. A large library would make the slowest calls warn every time, and a list of exceptions would be one more thing to maintain. The debug build's « took more than 16 ms »infogoes as well: every call now says its duration. As the ticket asked, no line is added in a service function.Tests (
backend::tests, real core)each_call_is_logged_as_it_answers_under_the_action_that_queued_it: adb, acomputeand aspawncall within an action are logged with that action's number, their name andok. Adbcall outside an action is logged with-. Each line has a duration inms.a_call_is_named_by_its_api_function_and_a_failure_by_its_code_alone:api::notes::geton a closed library is logged asdb - notes::get … Locked. A job failing with a sentinel title in its detail is logged withFileAccess, and the sentinel is in no line of the log.dbjob held past the bound and logged atwarn, no longer applies: there is no bound.Docs. The wiki's logs page gets a new section, « What the core was asked »: the line, the action's number, the name, the outcome, and why no call warns.
backend.mdpoints to that section from the queues, andtesting.md's profiling paragraph drops the 16 ms line.Checks run (Linux)
cargo test -p ui --lib: 1,580 pass.01_first_dayunder Xvfb: green. Its terminal stays silent; the calls go to the e2e flavour's file only.cargo clippy --workspace --all-targets --all-features -- -D warnings,cargo fmt --all --check,node scripts/architecture-links.mjs.Generated by Claude Code